<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});
Route::any('hello', function () {
    return 'apihello';
});

//首页接口
Route::any('homePage', 'Home\HomeController@homePage');
//获取Bim
Route::any('getBmi', 'Home\BmiController@userBmi');
//修改bmi
Route::any('updataBmi','Home\BmiController@updataBmi');

//苹果推送iosmsgsend
Route::any('push', 'Home\PushController@iosmsgsend');

//
route::any('test','Home\CityController@test');
route::any('query1','Home\CityController@query1');
route::any('query2','Home\CityController@query2');
route::any('query3','Home\CityController@query3');
route::any('query4','Home\CityController@query4');
route::any('query5','Home\CityController@query5');

route::any('orm1','Home\CityController@orm1');
route::any('orm2','Home\CityController@orm2');
route::any('orm3','Home\CityController@orm3');
route::any('orm4','Home\CityController@orm4');
route::any('request1','Home\CityController@request1');


route::any('response','Home\CityController@response');

route::group(['middleware'=>['web']],function (){
    route::any('session1',[
        'as' => 'session1',
        'uses'=>'Home\CityController@session1'
    ]);
    route::any('session2','Home\CityController@session2');


});


route::any('activity0','Home\CityController@activity0');
//中间件
route::group(['middleware'=>['activity']],function(){
    route::any('activity1','Home\CityController@activity1');
    route::any('activity2','Home\CityController@activity2');
});


route::any('upload','Home\CityController@upload');



route::any('login','LoginController@login');